program testclass1;

class testclass1

BEGIN

   VAR XRay : ARRAY[0 .. 4] OF integer; 
      AA       : integer;
      obj      : testclass2;

FUNCTION testfunc1;
   VAR 
      BB       : integer;
BEGIN	   
      XRay[3] := 2;
      PRINT XRay[3];
      testfunc2
END;

FUNCTION testfunc2;
   VAR 
      CC       : integer;
BEGIN	   
      CC := 5
      PRINT CC;
      obj := NEW testclass2;
      obj.XX := 75;
      PRINT obj.testfunc3

END

END

class testclass2

BEGIN

   VAR
      XX       : integer;

FUNCTION testfunc3;
      YY       : integer;
BEGIN	   
      YY := 99;
      PRINT XX;
      testfunc3 := YY
END;


END



.

